package com.ruyuan.eshop.inventory.service;

import com.ruyuan.eshop.inventory.domain.request.*;

/**
 * @author lxg
 * @Description:
 * @date 2022/3/2720:52
 */
public interface InventoryService {

    /**
     * 释放商品库存
     */
    Boolean releaseProductStock(ReleaseProductStockRequest releaseProductStockRequest);
    /**
     * 扣减商品库存
     * @param deductProductStockRequest
     * @return
     */
    Boolean deductProductStock(DeductProductStockRequest deductProductStockRequest);
    /**
     * 新增商品库存
     * @param request
     * @return
     */
    Boolean addProductStock(AddProductStockRequest request);

    /**
     * 调整商品库存
     * @param request
     * @return
     */
    Boolean modifyProductStock(ModifyProductStockRequest request);

    /**
     * 同步商品sku库存数据到缓存
     * @param request
     * @return
     */
    Boolean syncStockToCache(SyncStockToCacheRequest request);
}
